import _ from 'lodash';
import './css/style.css';
import Icon from './image/fav.png';
import Print from './print.js';

function component() {
  var element = document.createElement('div');
 var btn = document.createElement('button');

  // Lodash（目前通过一个 script 脚本引入）对于执行这一行是必需的
  //element.innerHTML = _.join(['Hello', 'webpack'], ' ');

    // Lodash, now imported by this script
    element.innerHTML = _.join(['Hello', 'webpack'], ' ');
    element.classList.add('redColor');

    var icon = new Image();
    icon.src=Icon
    icon.height=600
   
    element.appendChild(icon);
    

   btn.innerHTML = 'Click me and check the console!';
   btn.onclick = Print;

   element.appendChild(btn);

  return element;
}

document.body.appendChild(component());